<?php $elements = $this->form->getElements();?>
<?php if (count($elements) > 1):?>
<h4 class="hx-style01"><span>Фильтр</span></h4>
<div class="box" id="filterbox">
	<form name="<?php echo $this->form->getName();?>" action="<?php echo $this->form->getAction();?>" method="<?php echo $this->form->getMethod();?>" enctype="<?php echo $this->form->getEncType();?>">
		<div class="box">
		<?php $pos = 0;?>
		<?php $this->form->getElement('title')->setLabel('Модель');?>
		<?php $this->form->getElement('brand')->setLabel('Производитель');?>
		<?php foreach ($elements as $element):?>
			<?php $pos++;?>
			<?php if ($element->getName() != 'submit'):?>
				<div class="col30<?php if (($pos + 1) % 3 == 0):?> margin<?php elseif ($pos % 3 == 0):?> fix<?php endif;?>"><dl><?php echo $element;?></dl></div>
				<?php if ($pos % 3 != 0):?><hr class="noscreen" /><?php endif;?>
			<?php endif;?>
		<?php endforeach;?>
		</div>
		<div class="box t-center"><?php echo $this->form->getElement('submit')->setLabel('Фильтровать');?></div>
	</form>
</div>
<hr class="noscreen" />
<?php endif;?>

<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
<div class="box">
<?php $products = $this->paginator->getCurrentItems();?>
<?php $prodsCount = count($products);?>
<?php if ($prodsCount):?>
    <?php for ($pos = 1; $pos <= $prodsCount; $pos++):?>
    <?php $product = $products[$pos - 1];?>
    <?php array_push($this->keywords, $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'], $product['CATEGORIES_TITLE']);?>
    <div class="col30<?php if (($pos + 1) % 3 == 0):?> margin<?php elseif ($pos % 3 == 0):?> fix<?php endif;?>">
        <h4><a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'products', 'action' => 'view'), null, true); ?>/product/<?php echo $product['PRODUCTS_ALIAS'];?>" title="<?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?>"><?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?></a></h4>
        <p class="date">
            <?php echo date("d-m-Y", strtotime($product['PRODUCTS_DATE']));?> &nbsp;&ndash;&nbsp;
            <a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true); ?>/category/<?php echo $product['CATEGORIES_ALIAS'];?>" title="<?php echo $product['CATEGORIES_TITLE'];?>"><?php echo $product['CATEGORIES_TITLE'];?></a>
        </p>
        <p class="bb box" style="height:95px;"><img src="<?php if (!empty($product['PHOTOS_FILE'])):?>/timthumb/timthumb.php?src=<?php echo $product['PHOTOS_FILE'];?>&h=75&w=100&zc=0<?php else:?>/images/image-03.gif<?php endif;?>" width="100" height="75" alt="<?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?>" class="f-left" /><?php echo mb_substr($product['PRODUCTS_SHORTDESCR'], 0, 90, 'utf-8');?>...</p>
        <p class="t-center"><a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'products', 'action' => 'view'), null, true); ?>/product/<?php echo $product['PRODUCTS_ALIAS'];?>" class="ico-more">Подробнее...</a></p>
    </div>
    <?php if ($pos % 3 != 0):?><hr class="noscreen" /><?php endif;?>
    <?php endfor;?>
<?php else:?>
    <p>Этот раздел пока пуст</p>
<?php endif;?>
</div>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>

<hr class="noscreen" />
